package demo.controller;

import demo.form.LoginForm;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping
public class FormController {

	@PostMapping("/form")
	public @ResponseBody  String view(LoginForm form) {
		// x-www-form-urlencode
		return form.getUsername() + ":" + form.getPassword();
	}

}
